import http from '@/apis/http'
import { ACCOUNT_CENTER_SYSTEM } from '@/apis'

// 获取班级教师
export function getClassTeacher(params) {
  return http.get(`${ACCOUNT_CENTER_SYSTEM}/api/v2/school/class/teacher`, {
    params
  })
}

// 根据班级类型获取年级班级
export function getClassList(params) {
  return http.get(
    `${ACCOUNT_CENTER_SYSTEM}/api/ai/v1/person/teacher/class/details`,
    {
      params
    }
  )
}

// 根据班级id获取班级学生列表（行政班）
export function getAdministrationStudents(params) {
  return http.get(`${ACCOUNT_CENTER_SYSTEM}/api/v2/school/class/student`, {
    params
  })
}

// 获取靶向班列表
export function getTargetList(params) {
  return http.get(
    `${ACCOUNT_CENTER_SYSTEM}/api/ai/v1/school/class/targeted/list/visible`,
    {
      params
    }
  )
}

// 导出学生数据
export function exportSheet(params) {
  return http.get(`${ACCOUNT_CENTER_SYSTEM}/api/v2/person/student/export`, {
    params
  })
}

// 根据靶向班id获取靶向班学生列表
export function getTargetStudents(params) {
  return http.get(
    `${ACCOUNT_CENTER_SYSTEM}/api/ai/v1/school/class/targeted/studentV2`,
    { params }
  )
}

// 根据名称搜索教师
export function searchTeacher(params) {
  return http.get(
    `${ACCOUNT_CENTER_SYSTEM}/api/v2/person/teacher/search/basic_teachers`,
    { params }
  )
}

// 重置密码
export function resetPwd(params) {
  return http.post(
    `${ACCOUNT_CENTER_SYSTEM}/api/v2/person/reset_password`,
    params
  )
}

// 更新靶向班可见老师
export function updateTargetTeacher(params) {
  return http.post(
    `${ACCOUNT_CENTER_SYSTEM}/api/ai/v1/school/class/targeted/update/visible`,
    params
  )
}

// 删除靶向班
export function deleteTargetClass(params) {
  return http.post(
    `${ACCOUNT_CENTER_SYSTEM}/api/ai/v1/school/class/targeted/delete`,
    params
  )
}

// 根据靶向班id获取班级信息
export function getTargetInfo(params) {
  return http.post(
    `${ACCOUNT_CENTER_SYSTEM}/api/ai/v1/school/class/targeted/info`,
    params
  )
}
